package cn.tellsea.controller;

import cn.tellsea.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Spring Cloud OpenFeign 远程调用
 *
 * @author Tellsea
 * @date 2021/12/20
 */
@RestController
public class OpenFeignController {

    @Autowired
    private MessageService messageService;

    @GetMapping("/feign/message/{message}")
    public String message(@PathVariable String message) {
        return messageService.printMsg(message);
    }
}
